﻿using Common.Device.Views.Dialogs;
using Common.View.Tool;
using HandyControl.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace Common.Device.Tool
{
    public class CommonHelper
    {
        /// <summary>
        /// 获取已经实例化的设备调试窗口
        /// </summary>
        /// <param name="control">子窗口</param>
        /// <returns></returns>
        public static DeviceDebugView GetDebugView(DependencyObject control) 
        { 
            return ControlHelper.FindParent<DeviceDebugView>(control);
        }
        /// <summary>
        /// 获取已经实例化的指令编辑窗口
        /// </summary>
        /// <param name="control">子窗口</param>
        /// <returns></returns>
        public static OrderEditView GetEditView(DependencyObject control) 
        { 
            return ControlHelper.FindParent<OrderEditView>(control); 
        }
    }
}
